package com.gnkexy.springframework.test;

import com.gnkexy.springframework.beans.BeansException;
import com.gnkexy.springframework.context.supper.ClassPathXmlApplicationContext;
import com.gnkexy.springframework.test.event.CustomEvent;
import com.gnkexy.springframework.test.event.CustomEventListener;
import org.junit.Test;

public class ApiTest6 {


    @Test
    public void test_event() throws BeansException {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring.xml");
        applicationContext.publishEvent(new CustomEvent(this,00002345,"成功了"));

        applicationContext.registerShutdownHook();

    }

}
